<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasOne;

class Users extends Model
{
    protected $connection = 'mysql_center';
    protected $table = 'electric_platform_owner';
    public const CREATED_AT = "create_time";
    public const UPDATED_AT = "update_time";
    protected $hidden = [
        "user_login",
        "user_pwd"
    ];

    /**
     * Notes: 获取用户信息
     * User: lstink
     * Date: 2021/3/17
     * Time: 3:16 下午
     * @param $unionid
     * @return mixed
     */
    public function getUserInfo($unionid)
    {
        return $this->where('unionid', $unionid)->first();
    }


}
